<include file="Public:header" />
<div class="span-24 last">
    <include file="Public:menu" />
    <div class="span-19 last">
        <switch name="ACTION_NAME">
            <case value="add">
                <h4>添加链接</h4>
                <form name="linkform" method="post" action="__URL__/doadd">
                    <table border="1" cellspacing="1" >
                        <tr>
                            <th>链接名</th>
                            <td><input type="text" name="title" value=""  /></td>
                        </tr>
                        <tr>
                            <th>url</th>
                            <td><input type="text" name="url" value=""  /></td>
                        </tr>
                        <tr>
                            <th>logo</th>
                            <td><input type="text" name="logo" value=""  /></td>
                        </tr>
                                                <tr>
                            <th>描述</th>
                            <td><input type="text" name="description" value=""  /></td>
                        </tr>
                    </table>
                    <div align="center"><input type="submit" value="提交"  /></div>
                </form>
            </case>
            <case value="edit">
                <h4>编辑链接</h4>
                <form name="linkform" method="post" action="__URL__/doedit">
                    <table border="0" cellspacing="1" >
                        <tr>
                            <th>ID</th>
                            <td>{$id}<input type="hidden" name="id" value="{$id}"></td>
                        </tr>
                        <tr>
                            <th>链接名</th>
                            <td><input type="text" name="title" value="{$title}"  /></td>
                        </tr>

                        <tr>
                            <th>url</th>
                            <td><input type="text" name="url" value="{$url}"  /></td>
                        </tr>
                        <tr>
                            <th>logo</th>
                            <td><input type="text" name="logo" value="{$logo}"  /></td>
                        </tr>
                        <tr>
                            <th>描述</th>
                            <td><input type="text" name="description" value="{$description}"  /></td>
                        </tr>
                    </table>
                    <div align="center"><input type="submit" value="提交"  /></div>
                </form>
            </case>
            <default />
            <include file="Public:searchbar" />
            <form name="memberform" method="post" action="__URL__/batch">
                <table width="100%" border="1" cellspacing="1" >
                    <tr>
                        <th width="20"><input name="checkbox" type="checkbox"  onClick="selAll(this)" /></th>
                        <th width="30">ID</th>
                        <th>链接名</th>
                        <th>url</th>
                        <th>logo</th>
                        <th width="150">操作</th>
                    </tr>
                    <volist name="link" id="l">
                        <tr>
                            <td><input name="id[]" type="checkbox" id="id[]" value="{$l.uid}"  /></td>
                            <td>{$l.id}</td>
                            <td><a href="__URL__/edit/id/{$l.id}">{$l.title}</a></td>
                            <td><a href="__URL__/edit/id/{$l.id}">{$l.url}</a></td>
                            <td>{$l.logo}</td>
                        <td><a href="__URL__/edit/id/{$l.id}">编辑</a> <a href="__URL__/batch/act/delete/id/{$l.id}">删除</a></td>
                        </tr>
                    </volist>

                </table>

                <input name="act" type="radio" value="delete" />删除
                <input type="submit" value="提交"  />

            </form>
            <include file="Public:paging" />
        </switch>
    </div>
    <div class="clear"></div>
</div>
<include file="Public:footer" />